package com.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName MyListener
 * @Description: TODO
 * @Author lxc
 * @Date 2020/8/1 22:15
 * @Version V1.0
 **/
@Component
@RabbitListener(queues = "item_queue")
public class MyListener {

    @RabbitHandler
    public void msg(String msg) {
        System.out.println("ReciveMessage:"+msg);
    }

    @RabbitHandler
    public void msg(Integer number){
        System.out.println("ReciveNumver:"+number);
    }

}
